{layout name="define/layout" /}

<body id="reg">
    <div class="reg-w">
        <div class="reg-logo">
            <a href="javascript:;"></a>
        </div>
        <form id="lycms-register">
            <h4>用户注册</h4>
            <div class="reg-group">
                <label class="bd-r" style="letter-spacing: normal;">账号</label><input type="text" name="user_name"
                    class="reg-control" placeholder="请输入您的登录账号">
            </div>
            <div class="reg-group">
                <label>密码</label><input type="password" name="password" class="reg-control" placeholder="请输入您的登录密码">
            </div>
            <div class="reg-group">
                <label>确认密码</label><input type="password" name="password2" class="reg-control" placeholder="请输入您的确认密码">
            </div>
            <div class="reg-group">
                <label>邮箱</label><input type="text" name="email" id="email" class="reg-control" placeholder="请输入您的邮箱账户">
            </div>

            {eq name=":isEmailCode()" value="on"}
            <!-- 邮箱验证码 -->
            <div class="reg-group">
                <label>验证码</label><input type="text" name="captcha" class="reg-control" placeholder="请输入验证码"
                    style="width: 30%;">
                <div class="captcha-img" style=" position: relative; float: right; top: 5px; left: -3px; ">
                    <input class="btn-brand" type="button" id="getCode" value="获取"
                        style=" float: right; padding: 0px; margin: 0px; height: 36px; width: 80px; ">
                </div>
            </div>
            {else}
            <!-- 常规验证码 -->
            <div class="reg-group">
                <label>验证码</label><input type="text" name="captcha" class="reg-control" placeholder="请输入验证码"
                    style="width: 30%;">
                <div class="captcha-img" style=" position: relative; float: right; top: 5px; left: -3px; ">
                    <img id="captchaPic" src="{:captcha_src()}" onclick="this.src=this.src+'?d='+Math.random();"
                        title="点击刷新">
                </div>
            </div>
            {/eq}

            <div class="reg-group">
                <label>推荐人</label><input type="text" name="recommend" class="reg-control" placeholder="请输入推荐人(可选)">
            </div>

            <input type="button" id="btn_register" class="btn-brand btn-sub" value="立即注册">
        </form>
        <div class="reg-ts">
            <a href="/">返回首页</a><a href="/user/login.html">登录账号</a>
            <a href="/user/findpass.html">忘记密码</a>
        </div>
    </div>
    <script src="/static/user/js/login.js"></script>
    <script type="text/javascript">
        // 回车注册
        $("body").bind('keyup', function (event) {
            if (event.keyCode == 13) {
                $('#btn_register').click();
            }
        });
    </script>
    <div class="footer">
        <div class="layout">
            <div class="copyright">
                <p>&copy; 2020 <a class="color" href="//www.lykep.com">www.lykep.com 零艺客</a> </p>
            </div>
        </div>
    </div>
</body>